﻿using System;
using System.Windows.Forms;

namespace ruscehproj2
{
    public partial class bg006 : Form
    {
        int i = 1;
        int i2 = 1;
        bool i3 = true;
        public bg006()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            this.i++;
            if (this.i > 4) this.i = 1;
                 switch (this.i)
            {
                case 1: button1.BackgroundImage = Resources.set01; break;
                case 2: button1.BackgroundImage = Resources.set02; break;
                case 3: button1.BackgroundImage = Resources.set03; break;
                case 4: button1.BackgroundImage = Resources.set04; break;
            }
        }

        private void button2_Click(object sender, EventArgs e)
        {
            this.i2++;
            if (this.i2 > 4) this.i2 = 1;
            switch (this.i2)
            {
                case 1: button2.BackgroundImage = Resources.set01; break;
                case 2: button2.BackgroundImage = Resources.set02; break;
                case 3: button2.BackgroundImage = Resources.set03; break;
                case 4: button2.BackgroundImage = Resources.set04; break;
            }
        }

        private void button3_Click(object sender, EventArgs e)
        {
            i3 = !i3;
            if (i3) button3.BackgroundImage = Resources.sw1;
            else button3.BackgroundImage = Resources.sw2;
        }

        private void bg006_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Escape)
            {
                this.Hide();
            }
        }
    }
}
